Home

Operator Usage

Name

rotate-right

Description

rotate-right input-seq
rotate each superposition in input-seq right by 1 step

rotate-right[n] input-seq
rotate each superposition in input-seq right by n steps, modulus by the size of the corresponding superposition


Examples

rotate-right (|one> + |two> + |three> + |four> + |five> + |six> + |seven>)
    |seven> + |one> + |two> + |three> + |four> + |five> + |six>

rotate-right[3] (|one> + |two> + |three> + |four> + |five> + |six> + |seven>)
    |five> + |six> + |seven> + |one> + |two> + |three> + |four>


See also

Operator type

core normal, core compound